package com.bclz;

import java.util.Properties;

import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerRecord;

public class App {
	
	
	
	
	public static void main(String[] args) {
		Properties props=new Properties();
		props.setProperty("bootstrap.servers", "master:9092,node1:9092,node2:9092");
		props.setProperty("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
		props.setProperty("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
		KafkaProducer<String, String> producer=new KafkaProducer<>(props);
		ProducerRecord<String, String> record=new ProducerRecord<String, String>("country", "China");
		producer.send(record);
	}
	
	
}
